import request from '@/utils/request'

// 获取文章评论列表
export const getCommentsList = (params) => {
  return request({
    method: 'GET',
    url: '/comments',
    params
  })
}

// 发布评论或回复
export const addCommentsOrReply = (data) => {
  return request({
    method: 'POST',
    url: '/comments/add',
    data
  })
}

// 评论或者回复点赞
export const addCommentsPraise = (data) => {
  return request({
    method: 'POST',
    url: '/comments',
    data
  })
}

// 取消评论或回复点赞
export const delCommentsPraise = (data) => {
  return request({
    method: 'DELETE',
    url: '/comments',
    data
  })
}
